import React, { useState } from 'react'

export default function App() {
  let [star , setStar] = useState([{
    id : "01",
    name : '黄渤'
  },{
    id : "02",
    name : '王宝强'
  },{
    id : "03",
    name : '岳云鹏'
  },])
  return (
    <div>
       <button onClick = {() => {setStar([...star,{id : Date.now(),name : '老王'}])}}>点击添加数据</button>
       <ul>
          {
            star.map(item => {
              return <li key={item.id}>{item.name}</li>
            })
          }
       </ul>
    </div>
  )
}
